package com.vast.admin.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "com.vast.admin.entity.Placeholder")
@TableName(value = "placeholder")
@Data
public class Placeholder implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "null")
    private Long id;

    /**
     * 模板id
     */
    @TableField(value = "templete_id")
    @ApiModelProperty(value = "模板id")
    @JSONField(serialize = false)
    private Long templeteId;

    /**
     * 模板记录id
     */
    @TableField(value = "templete_record_id")
    @ApiModelProperty(value = "模板记录id")
    @JSONField(serialize = false)
    private Long templeteRecordId;

    /**
     * 占位符名称
     */
    @TableField(value = "placeholder_name")
    @ApiModelProperty(value = "占位符名称")
    private String placeholderName;

    /**
     * 占位符归属
     */
    @TableField(value = "placeholder_belong")
    @ApiModelProperty(value = "占位符归属")
    @JSONField(serialize = false)
    private String placeholderBelong;

    /**
     * 占位符表单key
     */
    @TableField(value = "placeholder_key")
    @ApiModelProperty(value = "占位符表单key")
    private String placeholderKey;

    /**
     *             //0普通属性，1姓名 2身份证 3电话 4合同签署日期 5借款金额 6借款期数 7月利率 8还款方式 9每月还款日 10日期)
     * 占位符标签(0文本，1身份证 2日期 3手机号 4数字 5签章 6借款期数 7月利率 8还款方式 9每月还款日 10借款金额)
     */
    @TableField(value = "placeholder_tag")
    @ApiModelProperty(value = "占位符标签(0文本，1身份证 2日期 3手机号 4数字 5签章 6借款期数 7月利率 8还款方式 9每月还款日 10借款金额)")
    private Integer placeholderTag;

    /**
     * 是否必填（-1隐藏 0否 1是）
     */
    @TableField(value = "`require`")
    @ApiModelProperty(value = "是否必填（-1隐藏 0否 1是）")
    private Integer require;

    /**
     * 删除标记（0是 1否）
     */
    @TableField(value = "valid")
    @ApiModelProperty(value = "删除标记（0是 1否）")
    @JSONField(serialize = false)
    private Integer valid;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    @JSONField(serialize = false)
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    @ApiModelProperty(value = "创建人")
    @JSONField(serialize = false)
    private Long createBy;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "修改时间")
    @JSONField(serialize = false)
    private Date updateTime;

    /**
     * 修改人
     */
    @TableField(value = "update_by")
    @ApiModelProperty(value = "修改人")
    @JSONField(serialize = false)
    private Long updateBy;

    /**
     * 保留字段， 供前端使用
     */
    @ApiModelProperty(value = "保留字段， 供前端使用")
    @TableField(exist = false)
    private String value;

    public Placeholder() {

    }

    public Placeholder(String placeholderName) {
        this.placeholderName = placeholderName;
    }

    public Placeholder(String placeholderBelong, String placeholderName) {
        this.placeholderBelong = placeholderBelong;
        this.placeholderName = placeholderName;
    }

    private static final long serialVersionUID = 1L;

    public static final String COL_TEMPLETE_ID = "templete_id";

    public static final String COL_TEMPLETE_RECORD_ID = "templete_record_id";

    public static final String COL_PLACEHOLDER_NAME = "placeholder_name";

    public static final String COL_PLACEHOLDER_BELONG = "placeholder_belong";

    public static final String COL_PLACEHOLDER_KEY = "placeholder_key";

    public static final String COL_PLACEHOLDER_TAG = "placeholder_tag";

    public static final String COL_REQUIRE = "`require`";

    public static final String COL_VALID = "valid";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_UPDATE_BY = "update_by";
}